Register encoding options when adding the service to the service collection#1575
Register encoding options when adding the service to the service collection#1575hugohlln wants to merge 3 commits intoaws:masterfrom
Conversation
|
Good idea, Very usefull for webp images with api gateway. |
normj
left a comment
There was a problem hiding this comment.
Thanks for the PR. I think the approach to solve the problem of configuring binary data is good. A few minor comments plus we also need some tests in the Amazon.Lambda.AspNetCoreServer.Test project.
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/EncodingOptions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer/Internal/EncodingOptions.cs
Outdated
Show resolved
Hide resolved
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/HostingOptions.cs
Outdated
Show resolved
Hide resolved
|
@normj Thanks for your feedbacks I just dit a new commit with following changes :
For unit tests, what would be the best way to test the injection of IEncodingOptions ? |
Libraries/src/Amazon.Lambda.AspNetCoreServer.Hosting/Internal/LambdaRuntimeSupportServer.cs
Outdated
Show resolved
Hide resolved
|
I just moved the registration of IEncodingOptions to LambdaRuntimeSupportServer level and removed redundant code from each AbstractAspNetCoreFunction<TREQUEST, TRESPONSE> implementations (APIGatewayHttpApiV2MinimalApi, APIGatewayRestApiMinimalApi and ApplicationLoadBalancerMinimalApi) |
|
Closing as this feature was address in PR #2267 that exposed all of the extension points from Amazon.Lambda.AspNetCoreServer onto the HostingOptions including @hugohlln I appreciate your effort but it made sense finally address getting all of the extension points over. |
Issue:: #1574
Description of changes:
Can now register content type for transformation by passing options to the HostingOptions object